javascript check if function exists

51

js check if function exists -

if (typeof yourFunctionName == 'function') { 
  yourFunctionName(); 
}

Comments

Submit
0 Comments